#ifndef __POWERUP_H__2010
#define __POWERUP_H__2010
#include <SDL/SDL.h>
#include "rockdodger_globals.h"

extern SDL_Surface *surf_laserpowerup[MAX_POWERUP_IMAGES];	//!< SDL Surfaces for the laser powerup
extern SDL_Surface *surf_shieldpowerup[MAX_POWERUP_IMAGES];	//!< SDL Surfaces for the shield powerup

//!< This structure holds all information about the powerup.
struct powerup {
  SDL_Surface **surf;		//!< Surface array with images
  float x, y;			//!< Position on the display
  float dx, dy;			//!< velocity
  float countdown;		//!< countdown before we get a new one...
  short active;			//!< Is active?
  short img_ctr;		//!< Counter of the current image surface
};

extern struct powerup powerup;

/*! \brief Initialise powerups.
 *
 * Initialises the powerups. Must be called before all other
 * functions.
 *
 * \returns pointer to the powerup or NULL on error
 */
struct powerup *init_powerup();

void display_powerup(SDL_Surface * surf_screen);

void deactivate_powerup();

/*! Do per screen update for the powerup.
 *
 * If the powerup is active it will be moved. If it is inactive the
 * counter will be updated and if it is time a new powerup will be
 * created.
 */
void update_powerup();



#endif
